<?php session_start(); if (!isset($_SESSION['uid'])) header('Location: login.php'); ?>
<!doctype html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <title>首页 - 仓库管理系统 V 1.0</title>
  <meta name="viewport" content="width=device-width,initial-scale=1">
  <link rel="stylesheet" href="bootstrap.min.css">
  <style>
    .card-icon{font-size:2rem;color:#0d6efd}
    .main-card{transition:.2s}
    .main-card:hover{transform:translateY(-3px)}
  </style>
</head>
<body class="bg-light">
<nav class="navbar navbar-dark bg-primary">
  <div class="container-fluid">
    <span class="navbar-brand mb-0 fw-bold">仓库管理系统 V 1.0</span>
    <a class="btn btn-outline-light btn-sm" href="logout.php">退出</a>
  </div>
</nav>

<div class="container py-4">
  <div class="row g-3">
    <div class="col-12 col-sm-6 col-lg-3">
      <a href="goods.php" class="text-decoration-none">
        <div class="card shadow main-card h-100">
          <div class="card-body text-center">
            <div class="card-icon mb-2">📦</div>
            <h5 class="card-title mb-0">商品管理</h5>
          </div>
        </div>
      </a>
    </div>

    <div class="col-12 col-sm-6 col-lg-3">
      <a href="stock.php" class="text-decoration-none">
        <div class="card shadow main-card h-100">
          <div class="card-body text-center">
            <div class="card-icon mb-2">📊</div>
            <h5 class="card-title mb-0">库存查询</h5>
          </div>
        </div>
      </a>
    </div>

    <div class="col-12 col-sm-6 col-lg-3">
      <a href="order.php?type=IN" class="text-decoration-none">
        <div class="card shadow main-card h-100">
          <div class="card-body text-center">
            <div class="card-icon mb-2">⬆️</div>
            <h5 class="card-title mb-0">入库单</h5>
          </div>
        </div>
      </a>
    </div>

    <div class="col-12 col-sm-6 col-lg-3">
      <a href="order.php?type=OUT" class="text-decoration-none">
        <div class="card shadow main-card h-100">
          <div class="card-body text-center">
            <div class="card-icon mb-2">⬇️</div>
            <h5 class="card-title mb-0">出库单</h5>
          </div>
        </div>
      </a>
    </div>
  </div>
</div>
<script src="bootstrap.bundle.min.js"></script>
</body>
</html>